package com.hushao.aimi.service;

import com.hushao.aimi.common.ServerResponse;
import com.hushao.aimi.vo.CategoryVo;
import org.springframework.data.domain.Pageable;

public interface CategoryService {



    /**
     * 查询分类子节点
     * @param categoryId
     * @return
     * @throws Exception
     */
    ServerResponse getChildrenParallelCategory(Integer categoryId)throws Exception;

    /**
     * 查询当前分类信息，递归查询子节点信息
     * @param categoryId
     * @return
     * @throws Exception
     */
    ServerResponse getCategoryAndChildrenById(Integer categoryId);

    /**
     * 查看品类列表（分页）
     * @param name
     * @param pageable
     * @return
     */
    ServerResponse getCategoryByNameLike(String name, Pageable pageable);

    /**
     * 获取品类列表
     * @return
     */
    ServerResponse listCategory();

    ServerResponse delCategory(Integer categoryId)throws Exception;

    /**
     * 更新品类
     * @param categoryVo
     * @return
     * @throws Exception
     */
    ServerResponse updateCategory(CategoryVo categoryVo)throws Exception;

    /**
     * 添加品类
     * @param categoryVo
     * @return
     * @throws Exception
     */
    ServerResponse addCategory(CategoryVo categoryVo)throws Exception;
}
